import unittest

from airflow.patsnap.util.dag_util import dag_id_from_workflow_id, workflow_id_from_dag_id


class TestDagUtil(unittest.TestCase):
    def test_dag_id_from_workflow_id(self):
        dag_id = dag_id_from_workflow_id('123')
        print(dag_id)
        self.assertEqual('dag-123', dag_id)

    def test_workflow_id_from_dag_id(self):
        workflow_id = workflow_id_from_dag_id('dag-123')
        print(workflow_id)
        self.assertEqual('123', workflow_id)
